The present invention relates to a supervisory apparatus for a computer and more particular to a watchdog timer which monitors execution of a program by the computer to return the computer to its initial state when the program malfunctions.
One conventional watchdog timer disclosed in a Japanese unexamined patent publication TOKKAISHO 55-57956 senses whether or not a series of consecutive pulses are produced at the output terminal of a microcomputer in accordance with a program in order to determine whether or not the program is running normally. When the program runs abnormally or erroneously due to noise, the watchdog timer resets the microcomputer to return it to its initial state, thereby causing reexecution of the program from the beginning. The microcomputer employs a circuit structure in which "1" and "0" are written alternately into a predetermined 1-bit cell of a register of its output circuit, thereby changing the device output terminal alternately to "1" and "0."However, there is a some possibility that the 1-bit register output will not be sensed accurately due to noise. The microcomputer reads commands stored in addresses in memory (generally ROM) corresponding to the contents of a program counter, decodes the commands and processes data also stored in the memory. When the computer is working regularly under the control of a program, it correctly performs tasks sequentially. However, when the program counter malfunctions due to noise or the like, the microcomputer may read, not commands, but data from the memory, decode the data as if the data were commands and perform the corresponding, erroneous operations. When the results of the commands executed by the data are output by the 1-bit register cell, the watchdog timer will not be able to recognize abnormal execution of the program. Since commands and data stored in the memory are both formulated by combinations of 1's and 0's having the same number of bits, but with values that vary widely, if the program counter fails as above, the microcomputer is very likely to malfunction as described above. Other publications which handle this subject matter in a manner similar to that of TOKKAISHO 55-57956 are Tokkaisho 57-48143, 50004 and 55432.